<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Gets the principal's entries from the Kerberos database</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.kadm5-get-principal" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">kadm5_get_principal</h1>
  <p class="verinfo">(PECL kadm5 &gt;= 0.2.3)</p><p class="refpurpose"><span class="refname">kadm5_get_principal</span> &mdash; <span class="dc-title">Gets the principal&#039;s entries from the Kerberos database</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.kadm5-get-principal-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>kadm5_get_principal</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$handle</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$principal</code></span>
   ) : <span class="type">array</span></div>

  <p class="para rdfs-comment">
   Gets the principal&#039;s entries from the Kerberos database.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.kadm5-get-principal-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">handle</code></dt>

     <dd>

      <p class="para">
       A KADM5 handle.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">principal</code></dt>

     <dd>

      <p class="para">
       The principal.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.kadm5-get-principal-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns array of options containing the following keys: KADM5_PRINCIPAL,
   KADM5_PRINC_EXPIRE_TIME, KADM5_PW_EXPIRATION, KADM5_ATTRIBUTES,
   KADM5_MAX_LIFE, KADM5_MOD_NAME, KADM5_MOD_TIME, KADM5_KVNO, KADM5_POLICY,
   KADM5_MAX_RLIFE, KADM5_LAST_SUCCESS, KADM5_LAST_FAILED,
   KADM5_FAIL_AUTH_COUNT on success 或者在失败时返回 <strong><code>FALSE</code></strong>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.kadm5-get-principal-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-659">
    <p><strong>Example #1 <span class="function"><strong>kadm5_get_principal()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$handle&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">kadm5_init_with_password</span><span style="color: #007700">(</span><span style="color: #DD0000">"afs-1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"GONICUS.LOCAL"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"admin/admin"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"password"</span><span style="color: #007700">);<br /><br />print&nbsp;</span><span style="color: #DD0000">"&lt;h1&gt;get_principal&nbsp;burbach@GONICUS.LOCAL&lt;/h1&gt;\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$options&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">kadm5_get_principal</span><span style="color: #007700">(</span><span style="color: #0000BB">$handle</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"burbach@GONICUS.LOCAL"&nbsp;</span><span style="color: #007700">);<br /><br />foreach&nbsp;(</span><span style="color: #0000BB">$options&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">$key&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">$value</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">$key</span><span style="color: #DD0000">:&nbsp;</span><span style="color: #0000BB">$value</span><span style="color: #DD0000">&lt;br&nbsp;/&gt;\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">kadm5_destroy</span><span style="color: #007700">(</span><span style="color: #0000BB">$handle</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.kadm5-get-principal-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="kadm5_get_principals.html" class="function" rel="rdfs-seeAlso">kadm5_get_principals()</a> - Gets all principals from the Kerberos database</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>